<div class="box box-info">
  <div class="box-header with-border">
    <h3 class="box-title">添加系统管理员表</h3>
    <div class="box-tools">
      <span onclick="HtmlRender('${BASE}/admin/sys/SysAdmin/index')" class="btn btn-info btn-sm">系统管理员表列表</span>
    </div>
  </div>
 
  <form action="${BASE}/admin/sys/SysAdmin/save" id="form_save" method="post" class="form-horizontal">
  <div class="box-body">
  
      <div class="form-group">
        <label for="loginName" class="col-sm-3 control-label">登录名：</label>
        <div class="col-sm-6">
          <input type="text" id="loginName" name="loginName" value="" class="form-control">
        </div>
        <div class="col-sm-3"> </div>
      </div>
      <div class="form-group">
        <label for="password" class="col-sm-3 control-label">密码：</label>
        <div class="col-sm-6">
          <input type="text" id="password" name="password" value="" class="form-control">
        </div>
        <div class="col-sm-3"> </div>
      </div>
      <div class="form-group">
        <label for="realName" class="col-sm-3 control-label">真实姓名：</label>
        <div class="col-sm-6">
          <input type="text" id="realName" name="realName" value="" class="form-control">
        </div>
        <div class="col-sm-3"> </div>
      </div>
      <div class="form-group">
        <label for="sex" class="col-sm-3 control-label">sex：</label>
        <div class="col-sm-6">
          <input type="text" id="sex" name="sex" value="" class="form-control">
        </div>
        <div class="col-sm-3"> </div>
      </div>
      <div class="form-group">
        <label for="email" class="col-sm-3 control-label">邮箱：</label>
        <div class="col-sm-6">
          <input type="text" id="email" name="email" value="" class="form-control">
        </div>
        <div class="col-sm-3"> </div>
      </div>
      <div class="form-group">
        <label for="phone" class="col-sm-3 control-label">电话：</label>
        <div class="col-sm-6">
          <input type="text" id="phone" name="phone" value="" class="form-control">
        </div>
        <div class="col-sm-3"> </div>
      </div>
      <div class="form-group">
        <label for="mobile" class="col-sm-3 control-label">手机：</label>
        <div class="col-sm-6">
          <input type="text" id="mobile" name="mobile" value="" class="form-control">
        </div>
        <div class="col-sm-3"> </div>
      </div>
      <div class="form-group">
        <label for="userType" class="col-sm-3 control-label">用户类型：</label>
        <div class="col-sm-6">
          <input type="text" id="userType" name="userType" value="" class="form-control">
        </div>
        <div class="col-sm-3"> </div>
      </div>
      <div class="form-group">
        <label for="photo" class="col-sm-3 control-label">用户头像：</label>
        <div class="col-sm-6">
          <input type="text" id="photo" name="photo" value="" class="form-control">
        </div>
        <div class="col-sm-3"> </div>
      </div>
      <div class="form-group">
        <label for="loginIp" class="col-sm-3 control-label">最后登陆IP：</label>
        <div class="col-sm-6">
          <input type="text" id="loginIp" name="loginIp" value="" class="form-control">
        </div>
        <div class="col-sm-3"> </div>
      </div>
      <div class="form-group">
        <label for="loginDate" class="col-sm-3 control-label">最后登陆时间：</label>
        <div class="col-sm-6">
          <input type="text" id="loginDate" name="loginDate" value="" class="form-control">
        </div>
        <div class="col-sm-3"> </div>
      </div>
      <div class="form-group">
        <label for="loginFlag" class="col-sm-3 control-label">是否可登录：</label>
        <div class="col-sm-6">
          <input type="text" id="loginFlag" name="loginFlag" value="" class="form-control">
        </div>
        <div class="col-sm-3"> </div>
      </div>

      <div class="form-group">
        <label class="col-sm-3 control-label">备注信息：</label>
        <div class="col-sm-6">
          <textarea id="remarks" name="remarks" cols="" rows="" class="form-control"  placeholder="备注信息...255个字符以内" dragonfly="true" onKeyUp="textarealength(this,255)"></textarea>
          <p class="textarea-numberbar"><em class="textarea-length">0</em>/255</p>
        </div>
        <div class="col-sm-3"> </div>
      </div>
      
  </div>
  <div class="box-footer">
    <div class="col-sm-10 col-sm-offset-2">
      <input class="btn btn-primary radius" type="submit" value="&nbsp;&nbsp;保存&nbsp;&nbsp;">
    </div>
  </div>
  </form>

</div>
  
<script type="text/javascript">
$(function(){
	$("#form_save").validate({
		errorPlacement: function(error, element) {
			error.appendTo(element.parent());
		},
		submitHandler : function(form) {
			layer.load(1, {shade: [0.3,'#fff']});
			$(form).ajaxSubmit({
				dataType:"json",
				success:function( jsondata ){
					layer.closeAll('loading');
					if( jsondata.code == "001" ){
						layer.msg(jsondata.msg, {icon: 6,offset: '45px'});
						HtmlRender("${BASE}/admin/sys/SysAdmin/index");
					}else{
						layer.msg(jsondata.msg, {icon: 5,offset: '45px'});
					}
				}
			});
		},
		rules : {
			name : {
				required : true
			}
		}, 
		messages : { 
			name : { 
				required : "名称不能为空"
			}
		}
	});
});
</script>